import 'dart:convert' show json;

class KeFus {

  int code;
  String datatype;
  String msg;
  List<kefus> newslist;

  KeFus.fromParams({this.code, this.datatype, this.msg, this.newslist});

  factory KeFus(jsonStr) => jsonStr == null ? null : jsonStr is String ? new KeFus.fromJson(json.decode(jsonStr)) : new KeFus.fromJson(jsonStr);

  KeFus.fromJson(jsonRes) {
    code = jsonRes['code'];
    datatype = jsonRes['datatype'];
    msg = jsonRes['msg'];
    newslist = jsonRes['newslist'] == null ? null : [];

    for (var newslistItem in newslist == null ? [] : jsonRes['newslist']){
      newslist.add(newslistItem == null ? null : new kefus.fromJson(newslistItem));
    }
  }

  @override
  String toString() {
    return '{"code": $code,"datatype": ${datatype != null?'${json.encode(datatype)}':'null'},"msg": ${msg != null?'${json.encode(msg)}':'null'},"newslist": $newslist}';
  }
}

class kefus {

  String reply;

  kefus.fromParams({this.reply});

  kefus.fromJson(jsonRes) {
    reply = jsonRes['reply'];
  }

  @override
  String toString() {
    return '{"reply": ${reply != null?'${json.encode(reply)}':'null'}}';
  }
}

